﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataGrid全选
{
    public class Person : INotifyPropertyChanged
    {
        private bool _isSelected;
        public event PropertyChangedEventHandler? PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        public string Id { get; set; }
        public string Name { get; set; }
        public int Age { get; set; }
        public bool IsSelected
        {
            get { return _isSelected; }
            set { _isSelected=value; OnPropertyChanged("IsSelected"); }
        }
    }
}
